<template>
	<div class="app-container2">
		<div style="margin-bottom: 24px">
			<div style="display: flex; justify-content: space-between">
				<div style="display: flex; align-items: center">
					<div>筛选条件：</div>
				</div>
				<el-button
					:icon="
						activeName == 1
							? 'el-icon-arrow-up'
							: 'el-icon-arrow-down'
					"
					@click="activeName = activeName == 1 ? '0' : '1'"
					plain
					>{{ activeName == 1 ? '收起' : '展开' }}筛选</el-button
				>
			</div>
			<el-collapse
				v-model="activeName"
				accordion
				style="margin-top: 20px"
			>
				<el-collapse-item title="" name="1">
					<el-form
						ref="form"
						:model="ruleForm"
						label-width="110px"
						style="padding-top: 20px"
						size="mini"
					>
						<el-form-item label="性别:">
							<el-checkbox-group v-model="ruleForm.type">
								<el-checkbox
									label="男"
									name="type"
								></el-checkbox>
								<el-checkbox
									label="女"
									name="type"
								></el-checkbox>
							</el-checkbox-group>
						</el-form-item>
						<el-form-item label="年龄段:">
							<el-checkbox-group v-model="ruleForm.type">
								<el-checkbox
									label="20岁及以下"
									name="type"
								></el-checkbox>
								<el-checkbox
									label="21-30岁"
									name="type"
								></el-checkbox>
								<el-checkbox
									label="31-40岁"
									name="type"
								></el-checkbox>
								<el-checkbox
									label="41-50岁"
									name="type"
								></el-checkbox>
								<el-checkbox
									label="51-60岁"
									name="type"
								></el-checkbox>
								<el-checkbox
									label="60岁以上"
									name="type"
								></el-checkbox>
							</el-checkbox-group>
						</el-form-item>
						<el-form-item label="民族:">
							<el-checkbox-group v-model="ruleForm.type">
								<el-checkbox
									label="汉族"
									name="type"
								></el-checkbox>
								<el-checkbox
									label="少数民族"
									name="type"
								></el-checkbox>
							</el-checkbox-group>
						</el-form-item>
						<el-form-item label="学历:">
							<el-checkbox-group v-model="ruleForm.type">
								<el-checkbox
									label="研究生"
									name="type"
								></el-checkbox>
								<el-checkbox
									label="本科"
									name="type"
								></el-checkbox>
								<el-checkbox
									label="大专"
									name="type"
								></el-checkbox>
								<el-checkbox
									label="中专（职高技校）"
									name="type"
								></el-checkbox>
								<el-checkbox
									label="高中"
									name="type"
								></el-checkbox>
								<el-checkbox
									label="初中及以下"
									name="type"
								></el-checkbox>
							</el-checkbox-group>
						</el-form-item>
						<el-form-item label="党内职务:">
							<el-checkbox-group v-model="ruleForm.type">
								<el-checkbox
									label="书记"
									name="type"
								></el-checkbox>
								<el-checkbox
									label="副书记"
									name="type"
								></el-checkbox>
								<el-checkbox
									label="组织委员"
									name="type"
								></el-checkbox>
								<el-checkbox
									label="宣传委员"
									name="type"
								></el-checkbox>
								<el-checkbox
									label="纪检委员"
									name="type"
								></el-checkbox>
								<el-checkbox
									label="群工委员"
									name="type"
								></el-checkbox>
								<el-checkbox
									label="常委"
									name="type"
								></el-checkbox>
								<el-checkbox
									label="其他"
									name="type"
								></el-checkbox>
							</el-checkbox-group>
						</el-form-item>
						<el-form-item label="所属组织:">
							<el-cascader :options="[]"></el-cascader>
						</el-form-item>
						<el-form-item label="入党日期:">
							<el-radio-group>
								<el-radio :label="3">建国前入党</el-radio>
								<el-radio :label="6">
									自定义
									<el-date-picker
										type="daterange"
										range-separator="至"
										start-placeholder="开始日期"
										end-placeholder="结束日期"
									>
									</el-date-picker
								></el-radio>
							</el-radio-group>
						</el-form-item>
						<el-form-item label="特定入党日期:">
							<el-input-number
								controls-position="right"
								:min="1"
								:max="12"
							></el-input-number>
							月
							<el-input-number
								controls-position="right"
								:min="1"
								:max="days"
							></el-input-number>
							日
						</el-form-item>

						<el-form-item label="类别及类型:">
							<el-checkbox-group v-model="ruleForm.type">
								<el-checkbox
									label="流动"
									name="type"
								></el-checkbox>
								<el-checkbox
									label="失联"
									name="type"
								></el-checkbox>
							</el-checkbox-group>
						</el-form-item>
					</el-form>
				</el-collapse-item>
			</el-collapse>
		</div>

		<div
			style="
				margin-bottom: 24px;
				display: flex;
				justify-content: space-between;
			"
		>
			<div style="display: flex; align-items: center">
				<el-button
					type="danger"
					icon="el-icon-download"
					style="margin-right: 12px"
					>导出</el-button
				>
			</div>
			<div style="display: flex; align-items: center">
				<el-button @click="submit">重置</el-button>
				<el-button type="danger">查询</el-button>
			</div>
		</div>
		<el-table :data="list" style="width: 100%" v-loading="loading">
			<el-table-column type="index" label="序号" align="center">
			</el-table-column>
			<el-table-column prop="date" label="所属党组织" align="center">
			</el-table-column>
			<el-table-column prop="date" label="姓名" align="center">
			</el-table-column>
			<el-table-column prop="date" label="性别" align="center">
			</el-table-column>
			<el-table-column prop="date" label="民族" align="center">
			</el-table-column>
			<el-table-column prop="date" label="出生日期" align="center">
			</el-table-column>
			<el-table-column prop="date" label="年龄" align="center">
			</el-table-column>
			<el-table-column prop="date" label="文化程度" align="center">
			</el-table-column>
			<el-table-column prop="date" label="党员类别" align="center">
			</el-table-column>
			<el-table-column prop="date" label="加入组织时间" align="center">
			</el-table-column>
			<el-table-column prop="date" label="转正时间" align="center">
			</el-table-column>
			<el-table-column prop="date" label="党内职务" align="center">
			</el-table-column>
			<el-table-column prop="date" label="现任职务或岗位" align="center">
			</el-table-column>
		</el-table>

		<pagination
			v-show="ruleForm.total > 0"
			:total="ruleForm.total"
			:page.sync="ruleForm.pageNum"
			:limit.sync="ruleForm.pageSize"
			@pagination="() => {}"
		/>
		<el-dialog title="提示" :visible.sync="dialogVisible" width="500px">
			<el-form
				:model="ruleForm"
				:rules="rules"
				ref="ruleForm"
				label-width="100px"
				class="demo-ruleForm"
			>
				<el-form-item label="活动名称" prop="name">
					<el-input v-model="ruleForm.name"></el-input>
				</el-form-item>
			</el-form>
			<span slot="footer" class="dialog-footer">
				<el-button @click="dialogVisible = false">取 消</el-button>
				<el-button type="primary" @click="dialogVisible = false"
					>确 定</el-button
				>
			</span>
		</el-dialog>
	</div>
</template>

<script>
// import { } from "@/api/card/home";
export default {
	data() {
		return {
			loading: false,
			value1: '',
			activeName: '1',
			dialogVisible: false,
			list: [],
			ruleForm: {
				pageNum: 1,
				pageSize: 10,
				total: 0,
				type: [],
			},
			rules: {
				name: [
					{
						required: true,
						message: '请输入活动名称',
						trigger: 'blur',
					},
				],
			},
		}
	},
	computed: {
		days() {
			//根据选中的月份来获取天数
			return 31
		},
	},
	methods: {
		submit() {
			
		},
		//切换分页
		handleCurrentChange(val) {
			this.loading = true
			this.ruleForm.pageNum = val
		},
		//切换总条数
		handleSizeChange(val) {
			this.loading = true
			this.ruleForm.pageSize = val
		},
	},
	created() {},
}
</script>

<style lang="scss" scoped>
::v-deep {
	.el-collapse-item__header {
		display: none;
	}
}
::v-deep .el-form-item {
	margin-bottom: 6px;
}
</style>
